package com.demo.service.impl;

import com.demo.dao.OfferPriceLogMapper;
import com.demo.entity.OfferPriceLog;
import com.demo.service.IOfferPriceLogService;
import com.itextpdf.text.log.Logger;
import com.itextpdf.text.log.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by byte2 on 2017-04-23.
 */
@Service
public class IOfferPriceLogServiceImpl implements IOfferPriceLogService {

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private OfferPriceLogMapper dataDao;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return dataDao.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(OfferPriceLog record) {
        return 0;
    }

    @Override
    public int insertSelective(OfferPriceLog record) {
        return dataDao.insertSelective(record);
    }

    @Override
    public int insertLog(String userId, Double price, String offerId) {
        OfferPriceLog opl = new OfferPriceLog();
        opl.setUserId(userId);
        opl.setOfferId(offerId);
        opl.setPrice(price);
        return dataDao.insertSelective(opl);
    }

    @Override
    public OfferPriceLog selectByPrimaryKey(Integer id) {
        return null;
    }

    @Override
    public int updateByPrimaryKeySelective(OfferPriceLog record) {
        return 0;
    }

    @Override
    public int updateByPrimaryKey(OfferPriceLog record) {
        return 0;
    }
}
